Without a CPU request, a container can potentially be scheduled on a node where there are not enough resources for it. This can lead to
unpredictable behavior of the container and the node itself.
What is the potential impact?
Unpredictable Resource Allocation
Without defined requests, Kubernetes doesn’t know how much of a particular resource to allocate to a container. This can lead to unpredictable
behavior, as the Kubernetes scheduler may not make optimal decisions about pod placement and resource contention management. For instance, a container
might not get the resources it needs to function correctly, leading to performance issues or even failure of the container.
System Instability
In the worst-case scenario, if a container uses more resources than a node can handle (due to lack of defined requests), it can cause the node to
run out of resources. In this case, Kubernetes may throttle its CPU usage. By setting a CPU request, Kubernetes will make sure that the container will
get the requested CPU.